Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #986

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Update dependencies #986

merged 1 commit into from
Oct 14, 2024

Conversation

lukellmann
Copy link
Member

io.ktor:ktor-client-websockets is an empty artifact, support for WebSockets is included in io.ktor:ktor-client-core, so the dependency was removed from kord-gateway.

* Gradle 8.10 -> 8.10.2
* Kotlin 2.0.20 -> 2.0.21
* Ktor 2.3.12 -> 3.0.0
* kotlinx.coroutines 1.8.1 -> 1.9.0
* kotlinx.serialization 1.7.2 -> 1.7.3
* kotlin-node 20.14.10-pre.800 -> 22.5.4-pre.818
* KSP 2.0.20-1.0.24 -> 2.0.21-1.0.25
* JUnit Jupiter 5.11.0 -> 5.11.2
* JUnit Platform 1.11.0 -> 1.11.2
* MockK 1.13.12 -> 1.13.13
* gradle-buildconfig-plugin 5.4.0 -> 5.5.0

io.ktor:ktor-client-websockets is an empty artifact, support for
WebSockets is included in io.ktor:ktor-client-core, so the dependency
was removed from kord-gateway.
@lukellmann lukellmann requested a review from DRSchlaubi October 12, 2024 21:07
Comment on lines -41 to +45
public fun fromPacket(packet: ByteReadPacket): RTPPacket? = with(packet) base@{
if (remaining <= 13) return@base null
public fun fromPacket(packet: Source): RTPPacket? = with(packet) base@{
if (!request(byteCount = 14)) return@base null
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lost-illusi0n was the <= here and below intended? The RTP header is 12 bytes and then you required to have 2 more bytes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I intentionally required it to have at least one more byte (12 byte header + a one byte payload), but wrote it like that. Woops. This could probably be changed, but a one byte payload is unlikely in reality (luckily). To be truly correct, an RTP packet could just be a header, with no payload. Maybe supporting that wouldn't be a bad idea. I just didn't bother (or forgot to) three years ago.

For the second <= case, that was to keep the intentional requirement of a payload in place. Made the same mistake of requiring a two byte payload again though. At least it's consistent)) If the requirement of a payload is dropped, then these extra data requirements can also be dropped. If not, then changing the upper bound of the data checks to one less should be fine too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, thanks for taking a look at this after 3 years :D

I think I'm going to leave the accidental +2 byte requirement in place for now. This PR is supposed to be a dependency upgrade and as you said it's unlikely that this causes problems in practice.

I'm working on the new encryption modes at the moment and I'm considering to touch the RTP logic with that too, so I'd rather bring in the change there.

@lukellmann lukellmann merged commit 1faf966 into main Oct 14, 2024
4 checks passed
@lukellmann lukellmann deleted the dependencies branch October 14, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants